<?php
//$this->roomcats_form->setAction('/admin/roomcats/updateroomcat/roomcat_id/' . $this->roomcat_id);
//echo $this->roomcats_form;
?>
<?php
echo $this->adminToolBar('roomcategory', 'edit', '/admin/roomcats/add/', '/admin/roomcats/updateroomcat/', '/admin/roomcats/delete/', '/admin/roomcats/index/');
?> 
<?php
$room_type_arr = explode("|", $this->roomcat_arr['room_type']);
$single_check = "";
$double_check = "";
$triple_check = "";

if($room_type_arr[0] == 'single') {
	$single_check = "checked='checked'";
} 
if (!empty($room_type_arr[1]) && $room_type_arr[1] == 'double') {
	$double_check = "checked='checked'";
} 
if (!empty($room_type_arr[2]) && $room_type_arr[2] == 'triple') {
	$triple_check = "checked='checked'";
}

if($this->roomcat_arr['is_enable'] == 1) {
	$status_active = "selected";
} else {
	$status_inactive = "selected";;
}
?>
<table border="0" width="100%" cellpadding="1" cellspacing="2">
	<tr>
		<td><b>Room Category</b></td>		
	</tr>
	<tr>
		<td><input type="text" name="room_cat" id="room_cat" value="<?php echo $this->roomcat_arr['roomcat_type']; ?>" class="input-2" /></td>
	</tr>
	<tr>
		<td><b>Room Type</b></td>		
	</tr>
	<tr>
		<td>
			<table border="0" width="50%" cellpadding="1" cellspacing="2">
				<tr>
					<td><input type="checkbox" name="room_type[]" value="single" <?php echo $single_check; ?> />&nbsp;Single</td>
					<td><input type="checkbox" name="room_type[]" value="double" <?php echo $double_check; ?> />&nbsp;Double</td>
					<td><input type="checkbox" name="room_type[]" value="triple" <?php echo $triple_check; ?> />&nbsp;Triple</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td><b>Status</b></td>
	</tr>
	<tr>
		<td>
			<select name="status" id="status" class="input-2">
				<option value="">Select Status</option>
				<option value="1" <?php echo $status_active; ?>>Active</option>
				<option value="0" <?php echo $status_inactive; ?>>Inactive</option>
			</select>
		</td>
	</tr>
	<input type="hidden" name="roomcatid" id="roomcatid" value="<?php echo $this->roomcat_id; ?>" />
</table> 